dirent: no longer cache the results of Stat and Info#71
Draft
charlievieth wants to merge 1 commit intomasterfrom
Draft
dirent: no longer cache the results of Stat and Info#71charlievieth wants to merge 1 commit intomasterfrom
charlievieth wants to merge 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #71 +/- ##
==========================================
- Coverage 59.24% 57.30% -1.94%
==========================================
Files 13 13
Lines 633 602 -31
==========================================
- Hits 375 345 -30
+ Misses 244 243 -1
Partials 14 14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
99f5440 to
4b11fec
Compare
03c16d3 to
74b9ebf
Compare
This commit changes fastwalk.DirEntry to no longer cache the result of
calling the Stat and Info methods.
goos: darwin
goarch: arm64
pkg: github.com/charlievieth/fastwalk
cpu: Apple M4 Pro
│ base.10.txt │ new.10.txt │
│ sec/op │ sec/op vs base │
UnixDirentInfo/Serial-14 648.6n ± 2% 616.6n ± 1% -4.92% (p=0.000 n=10)
UnixDirentInfo/Parallel-14 969.4n ± 0% 932.5n ± 0% -3.81% (p=0.000 n=10)
geomean 792.9n 758.3n -4.37%
│ base.10.txt │ new.10.txt │
│ B/op │ B/op vs base │
UnixDirentInfo/Serial-14 384.0 ± 0% 336.0 ± 0% -12.50% (p=0.000 n=10)
UnixDirentInfo/Parallel-14 384.0 ± 0% 336.0 ± 0% -12.50% (p=0.000 n=10)
geomean 384.0 336.0 -12.50%
│ base.10.txt │ new.10.txt │
│ allocs/op │ allocs/op vs base │
UnixDirentInfo/Serial-14 4.000 ± 0% 3.000 ± 0% -25.00% (p=0.000 n=10)
UnixDirentInfo/Parallel-14 4.000 ± 0% 3.000 ± 0% -25.00% (p=0.000 n=10)
geomean 4.000 3.000 -25.00%
goos: linux
goarch: amd64
pkg: github.com/charlievieth/fastwalk
cpu: AMD EPYC-Milan Processor
│ base.10.txt │ new.10.txt │
│ sec/op │ sec/op vs base │
UnixDirentInfo/Serial-4 2.235µ ± 1% 2.162µ ± 3% -3.24% (p=0.001 n=10)
UnixDirentInfo/Parallel-4 732.7n ± 2% 695.9n ± 2% -5.03% (p=0.000 n=10)
geomean 1.280µ 1.227µ -4.14%
│ base.10.txt │ new.10.txt │
│ B/op │ B/op vs base │
UnixDirentInfo/Serial-4 384.0 ± 0% 336.0 ± 0% -12.50% (p=0.000 n=10)
UnixDirentInfo/Parallel-4 384.0 ± 0% 336.0 ± 0% -12.50% (p=0.000 n=10)
geomean 384.0 336.0 -12.50%
│ base.10.txt │ new.10.txt │
│ allocs/op │ allocs/op vs base │
UnixDirentInfo/Serial-4 4.000 ± 0% 3.000 ± 0% -25.00% (p=0.000 n=10)
UnixDirentInfo/Parallel-4 4.000 ± 0% 3.000 ± 0% -25.00% (p=0.000 n=10)
geomean 4.000 3.000 -25.00%
74b9ebf to
6e67aac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit changes fastwalk.DirEntry to no longer cache the result of
calling the Stat and Info methods. This reduces memory usage by reducing
the size of the underlying DirEntry type and by saving an allocation in
the call to Stat/Info.
Benchmarks: